<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>  
 
<link rel="stylesheet" type="text/css" href="/jeons/js/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> 
<script type="text/javascript" src="/jeons/js/fancybox/jquery.fancybox-1.3.4.js"></script>
<!-- <script type="text/javascript" src="/jeons/js/fancybox/jquery.easing-1.3.pack.js"></script> -->
<script type="text/javascript" src="/jeons/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>

<script type="text/javascript" src="/jeons/js/jquery.nyroModal.custom.js"></script>
<link rel="stylesheet" href="/jeons/css/nyroModal/nyroModal.css" type="text/css" media="screen" />


<script type="text/javascript" src="/jeons/js/jquery.smartPop.min.js"></script>
<link rel="stylesheet" type="text/css" href="/jeons/css/jquery.smartPop.css" media="screen" />


<script type="text/javascript">
$(document).ready( function(){

 $("#BtnInsertData").click( function(){
	$.get('/jeons/buildqna/insert?bdtype='+$('#qna_bdtype').val()+'&bdno='+$('#qna_bdno').val(),function(data){
		$("#subpage_qna").replaceWith(data);
	});
}); 
//페이지 이동
 function goPage(page){
	$.get('/jeons/buildqna/index?page='+page,function(data){
		$("#subpage_qna").replaceWith(data);
	}); 
} 	


 $('#sample4').click(function() {
	    $.smartPop.open({bodyClose   : false,title: '스마트팝', width: 800, height: 200 ,background:'#000', log: false, url: '/jeons/buildqna/checkpasswd?qnano=24&board_type=read' });
	});

/* 
	$("#various3").fancybox({
		'width'				: '75%',
		'height'			: '75%',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	}); */
	 
 	$("[name=readView]").click( function(){
		$.get('/jeons/buildqna/view?qnano='+$(this).attr('qnano'),function(data){
			$("#subpage_qna").replaceWith(data);
		}); 
	}); 
	
	
 	$(".nm").nm({
		sizes : {
			minW : 400,
			maxW : 500,
			minH : 400,
			maxH : 400
		}
	});
	
	
});
</script>

<button type="button" id="sample4" value="sample4">dfdfdf</button>
<a class="nm" href="/jeons/buildqna/checkpasswd?qnano=24&board_type=read ">Iframe</a>


<div id="subpage_qna">
	<table  border="0" width="675px">
		<tr>
			<td colspan="5" bgcolor="#000000" height="1"></td>
		</tr>
		<tr>
			<th align="center">번호</th>
			<th align="center" width="400px">제목</th>
			<th align="center">공개여부</th>
			<th align="center">현재상태</th>
			<th align="center">작성일</th>
		</tr>
		<tr>
			<td colspan="4" bgcolor="#ffffff" height="1"></td>
		</tr>
		<c:forEach items="${qnadata}" var="item" varStatus="status">
		<tr>
			<td align="center">번호</td>
			<c:if test="${item.open != null}">
			<td  align="center" name="readView" qnano="${item.qnano}" id="readView">
			${item.title}
				<a href="/jeons/buildqna/checkpasswd?qnano=${item.qnano}&board_type=read" id="trigger_id">${item.title}</a> 
			</td>	
			</c:if>
			<c:if test="${item.open == null}">
			<td name="readView" qnano="${item.qnano}" align="center">
				${item.title}>
				</td>
			</c:if>
			</td>	
			
			<td align="center">
				<c:if test="${item.open != null}">
					<img src="/jeons/images/key.gif"/>
				</c:if>
			</td>
			<td align="center">
			<c:if test="${item.status == 'confirmation'}">
					확인
				</c:if>
				<c:if test="${item.status != 'confirmation'}">
					대기중
				</c:if>
			</td>
			<td align="center"><fmt:formatDate value="${item.rg}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
		</tr>
		</c:forEach>
		<tr>
			<td colspan="5" bgcolor="#ffffff" height="1"></td>
		</tr>
		<tr>
			<td colspan="5" bgcolor="#ffffff" height="1"></td>
		</tr>
	</table>
<div align="center">
	${page}
</div>		
<div align="right">
	<button type="button" id="BtnInsertData">글쓰기</button>
</div>
</div>	

